<template>
	<view class="pb-40">
		<view class="box">
			<view class="title flex flexSbetween">
				<view class="topTitle1 topTitle flexColumn flexJusCenter">用户权限</view>
				<view class="topTitle2 topTitle flexColumn flexJusCenter">个人免费用户</view>
				<view class="topTitle3 topTitle flexColumn flexJusCenter">个人会员</view>
				<view class="topTitle4 topTitle flexColumn flexJusCenter">企业用户</view>
			</view>
			<view class="list flex flexSbetween" :class="index % 2 ==0 ?'bgWhite':''" v-for="item,index in list" :key="index">
				<view class="topTitle flexColumn flexJusCenter">{{item.title}}</view>
				<view class="topTitle flexColumn flexJusCenter" :class="item.ordinary_user == 0 ?'actived':''">{{item.ordinary_user == 1 ? '有':'无'}}</view>
				<view class="topTitle flexColumn flexJusCenter" :class="item.member_user == 0 ?'actived':''">{{item.member_user == 1 ? '有':'无'}}</view>
				<view class="topTitle flexColumn flexJusCenter" :class="item.enterprise_user == 0 ?'actived':''">{{item.enterprise_user == 1 ? '有':'无'}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				list:[],
				type:''
			}
		},
		onLoad(option) {
			this.type = option.type
			this.getList()
		},
		methods:{
			getList(){
				let data={
					// identity: this.type == 0 ? 'ordinary_user' : this.type == 1 ? 'member_user' : 'enterprise_user'
					identity:''
				}
				this.api.get('api/content/equities',data).then(res=>{
					if(res.code == 200){
						this.list = res.data
					}
				})
			}
		}
	}
</script>

<style>
	.box{
		border: 4rpx solid #ececec;
		margin: 20rpx 8rpx;
		border-radius: 15rpx;
	}
	.topTitle{
		width: 200rpx;
		height: 100rpx;
		font-size: 28rpx;
		font-weight: 700;
		border-right: 1rpx solid #ececec;
	}
	.actived{
		color: #c8c9ca;
	}
	.topTitle1{
		background: #fef4f3;
	}
	.topTitle2{
		background: #fde8e7;
	}
	.topTitle3{
		background: #fedfda;
	}
	.topTitle4{
		background: #fdd5cf;
	}
	.list{
		padding: 0 10rpx;
		background: #FBFCFD;
		border-bottom: 1rpx solid #ececec;
	}
	.bgWhite{
		background: #fff;
	}
</style>